//求和相关配置
export default {
    namespaced:true,
    actions:{
        jia(context,value){
            console.log('actions中的加被调用了',context,value);
            context.commit('JIA',value);
        }
    },
    mutations:{
        JIA(state,value){
            state.sum+=value;
        },
        JIAN(state,value){
            state.sum-=value;
        }
    },
    state:{
        sum:0,
     school:'尚硅谷',
    subject:'前端',
    },
    getters:{
        bigSum(state){
            return state.sum*10;
        }
    }
}

